//
//  AppDelegate.swift
//  DBCA
//
//  Created by mugua on 2024/6/29.
//

import UIKit

@main
class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?


    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
        
        
        IQKeyboardManager.shared().previousNextDisplayMode = .alwaysHide
        IQKeyboardManager.shared().shouldResignOnTouchOutside = true
        
        self.window = UIWindow.init()
        self.window?.frame = UIScreen.main.bounds
        self.window?.backgroundColor = .white
        self.window?.rootViewController = DBBaseTabBarController()
        self.window?.makeKeyAndVisible()
        
        
        DBNetworkMonitor.shared.monitorNetworkStatus { status in
            var message = ""
            switch status {
            case .unknown:
                message = "unknown"
            case .notReachable:
                message = "notReachable"
            case .wwan:
                message = "wwan"
            case .wifi:
                message = "WiFi"
            }
            DBLog(message)
        }
        
        
        return true
    }
}

